﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Likegraph.aspx.vb" Inherits="LondonItalianRestaurants.Likegraph" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        Number of likes For restaurants
        <br />
        <asp:Chart ID="Chart1" runat="server" BackColor="LightGreen" 
            BackHatchStyle="Cross" DataSourceID="SqlDataSource1" Height="357px" 
            Palette="Bright" Width="489px">
            <Series>
                <asp:Series ChartType="Pie" Name="Series1" XValueMember="RestaurantName" 
                    YValueMembers="CountOfID">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [RestaurantName], [CountOfID] FROM [LikeCounting] WHERE ([CountOfID] &gt; ?)">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="CountOfID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        Average likes for restaurants</p>
    <p>
        <asp:Chart ID="Chart2" runat="server" BackColor="Blue" 
            BackHatchStyle="DarkHorizontal" DataSourceID="SqlDataSource2" Height="337px" 
            Width="495px">
            <Series>
                <asp:Series ChartType="Doughnut" Name="Series1" XValueMember="RestaurantName" 
                    YValueMembers="AvgOfID">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [RestaurantName], [AvgOfID] FROM [AverageLikes] WHERE ([AvgOfID] &gt; ?)">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="AvgOfID" Type="Double" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
</asp:Content>
